<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" />
		<title>解决方案三</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"/>
		<style>
			*{
				margin: 0;
				padding: 0;
			}
			html,body{
				width: 100%;
				height: 100%;
			}
			#container{
				position: relative;
				width: 100%;
				height: 100%;
			}
			#baidu{
				width: 100%;
				height: 200px;
				background-color: skyblue;
				display: block;
				pointer-events: none;
			}
			#shade{
				position: absolute;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
				text-align: center;
				background-color:rgba(0, 0, 0, 0.5);
			}
			#title{
				color: white;
				margin-top: 40px;
			}
			#close{
				width: 100px;
				height: 60px;
				font-size: 20px;
				margin-top: 50px;
			}
		</style>
	</head>
	<body>
		<div id="container">
			<a id="baidu" href="https://www.baidu.com">点我去百度</a>
			<div id="shade">
				<h1 id="title">恭喜一等奖！</h1>
				<button id="close">关闭</button>
			</div>
		</div>
		<script type="text/javascript" >
			const close = document.getElementById('close')
			const shade = document.getElementById('shade')
			const baidu = document.getElementById('baidu')

			close.ontouchstart= ()=>{
				shade.style.display = 'none'
				setTimeout(()=>{
					baidu.style.pointerEvents = 'auto'
				},300)
			}
		</script>
	</body>
</html>